# compile() with string source
# 将字符串源编译为代码 (Compiling String Source to Code)
code_str = 'x=5\ny=10\nprint("sum =",x+y)'
code = compile(code_str, 'sum.py', 'exec')
print(type(code))
exec(code)